#include "fullmap.h"

fullMap::fullMap()
{
    for(int i=0;i<Row;++i)
    {
        for(int j=0;j<Col;++j)
        {
            segs[i][j]=NULL;
        }
    }


}

fullMap::~fullMap()
{
    for(int i=0;i<Row;++i)
    {
        for(int j=0;j<Col;++j)
        {
            if(segs[i][j])
            {
                delete segs[i][j];
                segs[i][j]=NULL;
            }
        }
    }
}

void fullMap::loadMap()
{
    for(int i=0;i<Row;++i)
    {
        for(int j=0;j<Col;++j)
        {
            segs[i][j]=NULL;
        }
    }

    int tmp=glb.stage;
    switch(tmp)
    {
    case 1:
    {
        int map_1[Col][Row]={
           //1,2,3,4,5,6,7,8,9,0,1,2,3
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,1,0,1,0,0,0,0,0,1,0,1,0},
            {0,1,0,1,0,2,0,2,0,1,0,1,0},
            {0,1,0,1,0,2,0,2,0,1,0,1,0},
            {0,1,0,1,0,2,0,2,0,1,0,1,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {2,0,1,1,0,0,0,0,0,1,1,0,2},
            {0,0,0,0,0,1,1,1,0,0,0,0,0},
            {0,1,0,1,0,1,1,1,0,1,0,1,0},
            {0,1,0,1,0,1,0,1,0,1,0,1,0},
            {0,1,0,1,0,0,0,0,0,1,0,1,0},
            {0,1,0,1,0,1,1,1,0,1,0,1,0},
            {0,0,0,0,0,1,0,1,0,0,0,0,0},
        };
        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_1[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 2:
    {
        int map_2[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,3,3,3,3,3,0,3,3,3,3,3,0},//1行
             {3,3,0,1,1,1,0,1,1,1,0,3,3},//2
             {3,3,0,1,0,1,0,1,0,1,0,3,3},//3
             {3,3,0,1,1,1,0,1,0,1,0,3,3},//4
             {3,3,0,0,0,1,0,1,0,1,0,3,3},//5
             {3,3,0,1,1,1,0,1,1,1,0,3,3},//6
             {3,3,3,3,3,3,3,3,3,3,3,3,3},//7
             {2,0,0,0,0,0,2,0,0,0,0,0,2},//8
             {5,1,0,1,0,1,1,1,0,1,0,1,5},//9
             {5,1,2,1,2,1,1,1,2,1,2,1,5},//10
             {5,1,0,1,0,0,0,0,0,1,0,1,5},//11
             {5,1,0,1,0,1,1,1,0,1,0,1,5},//12
             {5,5,5,0,0,1,0,1,0,0,5,5,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_2[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 3:
    {
        int map_3[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,2,0,0,0,2,0,0,0,0,0},//1行
             {0,1,0,2,0,0,0,1,0,1,0,1,0},//2
             {0,1,0,0,0,0,1,1,0,1,2,1,0},//3
             {0,0,0,1,0,0,0,0,0,2,0,0,0},//4
             {5,0,0,1,0,0,2,0,0,1,5,1,0},//5
             {5,5,0,0,0,1,0,0,2,0,5,0,0},//6
             {0,1,1,1,5,5,5,2,0,0,5,1,0},//7
             {0,0,0,2,5,1,0,1,0,1,0,1,0},//8
             {2,1,0,2,0,1,0,1,0,0,0,1,0},//9
             {0,1,0,1,0,1,1,1,0,1,2,1,0},//10
             {0,1,0,0,0,0,0,0,0,0,0,0,0},//11
             {0,1,0,0,0,1,1,1,0,1,0,1,0},//12
             {0,1,0,1,0,1,0,1,0,1,1,1,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_3[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 4:
    {
        int map_4[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,5,5,0,0,0,0,0,0,0,0,5,0},//1行
             {5,5,0,0,0,1,1,1,0,0,0,0,5},//2
             {5,0,0,0,1,1,1,1,1,1,0,0,2},//3
             {2,0,0,1,1,0,0,1,1,1,1,0,0},//4
             {0,0,0,1,0,0,0,0,0,1,1,0,0},//5
             {4,0,1,1,0,2,0,2,1,0,0,0,0},//6
             {0,0,0,1,0,0,0,0,1,0,4,4,4},//7
             {0,0,0,1,0,0 ,1,1,1,0,0,0,0},//8
             {0,0,1,1,1,1,1,1,1,1,1,0,0},//9
             {0,0,1,0,1,1,1,1,1,1,0,1,0},//10
             {0,1,1,1,0,0,0,0,0,1,1,0,5},//11
             {5,0,1,1,1,1,1,1,0,0,1,5,5},//12
             {2,5,0,0,0,1,0,1,0,1,5,5,2},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_4[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 5:
    {
        int map_5[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,1,1,0,0,0,0,0,0,0},//1行
             {0,0,1,0,1,0,0,0,2,2,2,0,0},//2
             {2,0,1,0,0,0,1,0,0,0,0,0,0},//3
             {1,0,1,1,1,0,1,1,0,4,4,0,4},//4
             {0,0,0,0,4,4,0,0,0,4,0,0,0},//5
             {1,1,1,0,4,1,0,4,4,4,1,1,1},//6
             {0,0,0,0,4,1,0,0,0,0,0,0,0},//7
             {4,4,4,0,4,0,2,0,1,0,0,2,0},//8
             {0,0,0,0,1,1,1,1,1,0,0,1,1},//9
             {1,1,1,0,1,0,0,1,1,0,0,0,0},//10
             {1,1,0,0,1,1,0,0,1,1,0,0,0},//11
             {1,0,0,1,0,1,1,1,0,1,1,0,0},//12
             {0,0,0,0,0,1,0,1,0,0,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_5[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 6:
    {
        int map_6[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,0,0,0,1,1,0,0,0,0},//1行
             {0,0,2,2,2,2,0,0,0,0,2,0,0},//2
             {0,0,2,0,0,0,5,0,2,2,2,0,0},//3
             {0,2,0,0,0,5,2,0,0,0,2,0,0},//4
             {0,0,0,0,5,2,2,0,0,0,0,2,0},//5
             {0,2,0,5,2,2,2,0,2,0,0,0,0},//6
             {0,0,0,2,2,0,0,0,2,2,0,0,0},//7
             {2,0,0,0,2,0,2,2,2,0,0,2,0},//8
             {0,0,2,0,0,0,2,2,5,0,2,2,0},//9
             {0,2,0,0,0,0,2,5,0,2,2,2,0},//10
             {0,2,2,2,0,0,5,0,0,2,0,0,0},//11
             {0,0,0,0,0,1,1,1,0,0,0,2,2},//12
             {2,2,0,0,0,1,0,1,0,0,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_6[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 7:
    {
        int map_7[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,1,0,0,1,0,1,0,1,0,0,0},//1行
             {5,1,1,1,0,1,0,2,0,1,1,0,0},//2
             {5,5,5,0,0,0,0,1,0,1,0,0,1},//3
             {5,4,4,4,4,4,4,4,4,4,4,0,4},//4
             {0,1,0,0,0,1,1,1,1,0,0,0,0},//5
             {0,0,1,0,0,1,1,1,5,1,2,2,1},//6
             {1,1,0,1,0,1,1,1,0,0,0,0,0},//7
             {0,0,0,2,0,2,0,5,5,5,5,0,0},//8
             {4,4,0,4,4,4,4,4,0,4,4,4,4},//9
             {5,5,0,1,0,0,1,1,1,0,0,0,0},//10
             {5,5,1,0,0,0,0,1,0,2,0,1,0},//11
             {5,2,1,0,0,1,1,1,0,1,0,1,0},//12
             {0,0,0,0,0,1,0,1,0,1,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_7[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 8:
    {
        int map_8[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,5,5,0,0,0,0,0,5,5,0,0},//1行
             {0,1,5,5,0,1,0,1,0,5,5,0,0},//2
             {0,0,5,0,0,0,0,0,0,0,5,1,0},//3
             {0,0,5,1,0,0,2,0,0,1,5,0,0},//4
             {2,1,1,0,0,0,1,1,0,0,1,2,2},//5
             {4,0,0,0,0,0,1,1,0,0,0,0,0},//6
             {4,1,2,1,0,0,0,0,0,1,1,1,4},//7
             {4,1,0,1,0,1,1,1,0,5,0,1,4},//8
             {4,1,5,1,0,0,1,0,1,5,0,1,4},//9
             {4,0,0,1,0,1,1,1,0,1,0,1,4},//10
             {1,1,1,1,0,0,0,0,0,0,1,1,4},//11
             {4,0,0,0,0,1,1,1,0,0,0,0,0},//12
             {4,5,5,5,0,1,0,1,0,2,5,5,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_8[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 9:
    {
        int map_9[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,3,3,3,1,3,0,3,1,3,3,3,0},//1行
             {3,5,5,5,1,0,0,0,0,0,0,0,0},//2
             {2,5,5,5,3,3,3,3,3,3,3,3,3},//3
             {4,5,5,5,0,0,0,1,0,1,1,1,1},//4
             {4,5,5,5,1,1,1,0,0,1,0,1,0},//5
             {4,5,5,5,0,0,1,0,0,0,0,1,0},//6
             {4,5,3,3,3,3,2,2,2,3,3,5,3},//7
             {4,1,0,1,0,0,0,0,0,5,5,5,5},//8
             {2,1,1,1,0,1,1,1,1,5,5,5,5},//9
             {1,0,0,0,0,1,0,0,0,5,5,5,5},//10
             {1,0,0,0,0,0,0,1,1,1,5,5,4},//11
             {1,1,0,2,0,1,1,1,0,5,5,5,4},//12
             {2,1,1,1,0,1,0,1,0,1,1,1,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_9[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 10:
    {
        int map_10[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,3,5,0,0,0,0,0,0,0,0,5,0},//1行
             {5,3,0,0,0,1,1,5,5,5,5,0,5},//2
             {5,3,0,0,1,5,5,3,1,1,1,0,0},//3
             {2,0,3,1,1,3,3,1,1,5,5,0,0},//4
             {0,0,0,1,0,0,0,0,1,1,0,1,0},//5
             {4,0,1,0,2,0,2,0,1,1,0,0,0},//6
             {0,0,1,0,0,0,0,0,1,1,0,4,4},//7
             {2,0,1,1,5,5,3,1,1,1,0,5,1},//8
             {2,1,1,1,5,1,1,1,1,1,0,5,1},//9
             {3,1,1,1,5,1,1,1,1,0,0,5,1},//10
             {3,1,1,0,1,0,0,1,1,0,0,3,5},//11
             {5,0,1,0,0,1,1,1,0,0,0,5,5},//12
             {2,5,0,0,0,1,0,1,0,0,5,5,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_10[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 11:
    {
        int map_11[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,3,3,3,3,0,0,0,5,5,3,3,0},//1行
             {3,1,0,0,1,0,0,0,1,5,1,1,5},//2
             {3,1,2,0,1,0,0,1,0,5,1,0,5},//3
             {3,1,0,0,1,1,2,1,1,5,0,1,5},//4
             {3,0,0,0,1,2,1,1,1,1,0,0,5},//5
             {1,1,1,0,0,0,5,1,5,0,0,0,1},//6
             {4,3,3,3,0,5,5,5,0,3,3,3,4},//7
             {2,1,1,0,0,5,5,5,0,1,1,1,2},//8
             {0,0,0,0,1,0,5,0,1,0,0,0,0},//9
             {3,1,3,3,1,0,0,0,2,3,3,3,3},//10
             {5,1,1,0,0,1,0,1,0,0,1,1,5},//11
             {0,0,1,0,0,1,1,1,0,0,5,5,5},//12
             {0,0,2,0,0,1,0,1,0,0,1,5,5},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_11[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 12:
    {
        int map_12[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,0,0,0,2,2,0,0,0,0},//1行
             {0,0,4,2,2,2,0,0,0,0,2,0,0},//2
             {1,0,4,0,0,0,5,0,2,1,4,0,1},//3
             {0,1,0,0,0,5,2,0,0,0,4,1,0},//4
             {0,0,1,0,5,4,2,5,5,5,4,5,0},//5
             {2,2,5,5,4,2,2,0,2,1,5,0,0},//6
             {5,5,5,2,4,1,0,0,1,2,0,5,5},//7
             {2,0,0,0,2,0,1,2,2,0,0,2,5},//8
             {0,0,2,0,0,0,1,1,5,0,0,2,5},//9
             {0,2,0,0,0,1,2,5,1,0,2,2,5},//10
             {0,2,2,2,0,0,5,0,0,2,0,0,5},//11
             {1,4,4,1,0,1,1,1,0,0,1,0,2},//12
             {1,1,1,0,0,1,0,1,0,0,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_12[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 13:
    {
        int map_13[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,1,0,0,1,0,1,0,1,0,0,0},//1行
             {5,1,1,1,0,1,0,2,0,1,1,0,0},//2
             {5,4,4,4,4,4,0,4,4,4,4,5,5,},//3
             {0,1,0,0,0,0,1,0,0,0,5,5,5},//4
             {1,5,1,0,0,0,2,1,2,1,1,2,2},//5
             {1,1,0,1,1,1,1,1,5,1,1,1,1},//6
             {5,5,0,2,5,2,5,5,5,5,5,2,0},//7
             {2,4,0,4,4,4,4,4,0,4,4,4,4},//8
             {5,5,0,1,0,0,1,1,0,0,0,0,3},//9
             {5,5,0,0,0,0,0,1,0,2,1,1,3},//10
             {5,5,1,0,1,0,0,0,0,1,0,1,3},//11
             {5,2,1,1,0,1,1,1,0,0,1,1,3},//12
             {3,3,1,0,0,1,0,1,0,1,0,1,3},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_13[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 14:
    {
        int map_14[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,1,0,0,0,0,5,0,5,0,0},//1行
             {0,1,0,0,0,5,0,5,5,2,0,1,0},//2
             {5,4,5,0,5,0,2,0,5,0,5,4,0},//3
             {1,4,0,2,0,5,0,5,0,0,0,4,5},//4
             {1,4,5,0,5,0,0,0,0,0,0,4,1},//5
             {1,4,0,5,0,5,0,5,0,5,0,4,1},//6
             {2,1,0,0,2,0,0,0,2,0,0,1,1},//7
             {1,4,0,5,0,5,0,5,0,5,0,4,5},//8
             {1,4,0,5,0,5,0,5,0,5,0,4,1},//9
             {1,4,0,0,2,0,0,0,2,0,0,4,1},//10
             {5,4,0,5,0,5,0,5,0,5,0,4,1},//11
             {1,1,1,1,0,1,1,1,0,0,1,1,1},//12
             {1,1,1,1,0,1,0,1,0,0,1,1,1},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_14[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 15:
    {
        int map_15[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,0,0,0,0,0,0,0,0,0},//1行
             {2,1,0,1,1,0,0,0,0,1,1,1,2},//2
             {0,1,1,1,0,5,5,5,5,0,0,0,1},//3
             {1,0,1,0,1,5,5,5,5,0,1,1,1},//4
             {1,1,0,1,1,5,2,2,5,1,0,0,1},//5
             {0,1,0,1,0,4,4,4,4,1,0,0,0},//6
             {1,1,1,1,0,2,1,2,2,1,1,2,1},//7
             {0,0,0,0,2,0,1,0,2,0,0,0,0},//8
             {0,0,1,1,1,1,1,1,1,1,1,0,0},//9
             {1,5,0,0,0,2,2,0,0,0,0,2,1},//10
             {2,5,5,5,5,5,5,5,5,5,5,5,1},//11
             {0,0,5,5,5,1,1,1,5,5,5,5,0},//12
             {0,0,2,1,0,1,0,1,0,0,1,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_15[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 16:
    {
        int map_16[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,0,2,0,1,0,1,1,0,0},//1行
             {3,0,1,1,3,1,0,1,0,0,0,0,0},//2
             {3,1,1,1,3,1,1,1,1,1,0,5,5},//3
             {3,1,1,0,3,3,0,2,1,5,2,5,5},//4
             {3,4,0,1,1,3,2,1,1,5,2,4,1},//5
             {3,4,0,0,2,3,3,1,0,5,5,1,1},//6
             {3,4,1,1,0,2,5,5,5,5,5,3,3},//7
             {3,0,0,2,0,0,5,3,3,3,5,3,3},//8
             {2,3,0,5,5,5,5,2,5,5,5,1,3},//9
             {3,3,2,5,5,5,5,0,0,0,0,1,1},//10
             {3,1,2,2,0,0,1,0,0,1,1,1,0},//11
             {3,1,5,5,0,1,1,1,0,1,1,1,0},//12
             {3,1,5,5,0,1,0,1,0,0,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_16[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 17:
    {
        int map_17[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,0,0,0,0,1,1,1,0,0,0},//1行
             {5,1,1,1,0,0,0,0,0,1,0,0,0},//2
             {5,0,0,0,1,0,1,0,0,0,0,1,1},//3
             {5,4,4,4,4,4,0,1,1,4,4,1,2},//4
             {5,5,2,2,2,4,0,1,0,2,0,1,5},//5
             {1,5,1,1,1,4,4,4,0,4,1,1,5},//6
             {5,5,5,5,2,4,5,5,2,4,5,5,5},//7
             {4,4,4,0,4,4,1,1,0,4,0,0,5},//8
             {1,0,0,0,0,1,2,2,0,4,4,2,5},//9
             {3,1,1,0,0,0,0,0,0,0,0,0,5},//10
             {3,1,1,0,1,1,0,0,2,1,1,0,3},//11
             {2,1,1,0,0,1,1,1,0,1,3,3,3},//12
             {1,1,1,0,0,1,0,1,0,1,1,1,1},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_17[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 18:
    {
        int map_18[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,3,3,3,3,3,0,3,3,3,3,3,0},//1行
             {1,1,0,1,1,1,0,3,3,3,3,3,0},//2
             {0,1,0,1,0,1,0,3,3,3,3,3,0},//3
             {1,1,0,1,0,1,0,3,3,3,3,3,0},//4
             {0,1,0,1,0,1,0,3,3,3,3,3,0},//5
             {1,1,0,1,1,1,0,3,3,3,3,3,3},//6
             {3,3,3,3,3,3,3,3,3,3,2,0,0},//7
             {0,0,2,0,0,0,0,0,2,1,5,1,0},//8
             {0,1,1,1,0,1,0,1,5,1,5,1,2},//9
             {2,1,1,1,2,1,2,1,5,0,5,1,0},//10
             {0,1,0,1,0,0,0,0,5,1,5,1,0},//11
             {0,0,0,0,0,1,1,1,5,1,5,5,5},//12
             {0,0,0,0,0,1,0,1,0,0,0,0,0},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_18[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 19:
    {
        int map_19[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,0,0,2,0,0,0,0,0,0,5,1,0},//1行
             {0,0,0,1,0,1,0,1,0,0,5,1,0},//2
             {5,5,1,1,0,1,2,1,0,0,5,1,1},//3
             {0,0,1,1,0,2,0,0,3,5,5,0,0},//4
             {0,1,2,0,0,1,5,1,2,1,5,5,0},//5
             {1,1,0,0,2,1,5,0,0,0,1,1,1},//6
             {1,5,5,2,1,1,5,1,0,0,0,0,0},//7
             {5,1,0,1,0,1,0,1,0,1,2,1,4},//8
             {0,1,0,1,0,4,4,1,4,4,4,1,0},//9
             {0,1,1,1,0,1,2,1,4,5,5,1,0},//10
             {0,1,1,1,0,0,0,0,0,5,4,1,0},//11
             {0,0,0,0,0,1,1,1,0,5,4,1,0},//12
             {0,0,0,0,0,1,0,1,0,0,3,3,3},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_19[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    case 20:
    {
        int map_20[Col][Row]={
            //1,2,3,4,5,6,7,8,9,0,1,2,3
             {0,2,0,0,1,0,0,0,1,0,0,2,0},//1行
             {1,0,0,3,0,0,5,0,0,3,0,0,1},//2
             {0,0,2,0,0,5,0,5,0,0,2,0,0},//3
             {0,3,0,0,5,0,1,0,5,0,0,3,0},//4
             {1,0,0,5,0,1,0,1,0,5,0,0,1},//5
             {0,0,5,0,1,0,0,0,1,0,5,0,0},//6
             {0,5,0,1,0,0,2,0,0,1,0,5,0},//7
             {0,0,5,0,1,0,0,0,2,0,5,0,0},//8
             {2,0,0,5,0,1,0,1,0,5,0,0,2},//9
             {0,1,0,0,5,0,1,0,5,0,0,1,0},//10
             {0,0,3,0,0,5,0,5,0,0,3,0,0},//11
             {1,0,0,1,0,1,1,1,0,1,0,0,1},//12
             {1,1,0,0,0,1,0,1,0,0,0,1,1},//13
             };

        for(int i=0;i<Row;++i)
        {
            for(int j=0;j<Col;++j)
            {
                segs[i][j]=new mapSeg(i,j);
                segs[i][j]->kind=map_20[i][j];
                segs[i][j]->modifyMapSeg(i,j);
            }
        }
        break;
    }
    default:
        break;
    }

    //增加关卡数
    if(glb.stage<=glb.stagesNum)
    {
        ++glb.stage;
    }
}



void fullMap::display(QPainter &paint)
{
    paint.setBrush(Qt::black);
    paint.setPen(Qt::black);
    paint.drawRect(0,0,Width,Height);


    for(int i=0;i<Row;++i)
    {
        for(int j=0;j<Col;++j)
        {
            if(segs[i][j]!=NULL)
                segs[i][j]->display(paint);
        }
    }

}

mapSeg* fullMap::getSeg(int i, int j) const
{
    return segs[i][j];
}
